package lab02.Test11;

public class Square extends Rectangle {
    double m;

    public double getM() {
        m=Math.sqrt(a*a+b*b);
        return m;
    }

    public void setM(double m) {
        this.m = m;
    }

    @Override
    public void printMyWay() {
        super.printMyWay();
        System.out.println("对轴线："+getM() );
    }
}
